import React from 'react';
import { Form, Input, Button, Space, Select, Tooltip, Row, Col } from 'antd';
import { SearchOutlined } from '@ant-design/icons';

const Search = (props: any) => {
  const [form] = Form.useForm();
  const { callbackValue, loading } = props;
  const onReset = () => {
    form.resetFields();
  };
  const onFinish = (values: any) => {
    callbackValue(values);
  };
  return (
    <Form
      style={{ display: 'flex', flex: 1 }}
      form={form}
      name="control-hooks"
      onFinish={onFinish}
    >
      <Form.Item name="company" style={{ margin: 0, width: 200 }}>
        <Input placeholder={'请输入公司名'} />
      </Form.Item>
      <span style={{ padding: 4 }} />
      <Form.Item style={{ margin: 0 }}>
        <Tooltip title="搜索">
          <Button
            disabled={loading}
            type="primary"
            htmlType="submit"
            icon={<SearchOutlined />}
          />
        </Tooltip>
      </Form.Item>
    </Form>
  );
};

export default Search;
